package com.mall.dubbo.api;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.mall.model.domain.UmsAdmin;
import com.mall.model.domain.UmsRole;

import java.util.List;

/**
 * @author xyiaao
 * @description 针对表【ums_admin(后台用户表)】的数据库操作Api
 * @createDate 2022-03-29 19:46:09
 */
public interface UmsAdminApi extends IService<UmsAdmin> {

    UmsAdmin findUmsAdmin(String username, String password);

    UmsAdmin findUmsAdminById(Long id);

    boolean delete(Long id);

    Page<UmsAdmin> listPage(String keyword, Integer pageNum, Integer pageSize);

    UmsAdmin register(UmsAdmin umsAdmin);

    void roleUpdate(Integer adminId, List<Integer> roleIds);

    UmsRole findRoleByAdminId(Integer adminId);

    UmsAdmin findUmsAdminByUsername(String username);

}
